<template>
  <div class="collect-page">
     <van-nav-bar
     fixed
  title="我的出租"
  left-arrow
  @click-left="$router.back()"
/>
   <van-list
      v-model="loading"
      :finished="finished"
      finished-text="没有更多了"
      @load="onLoad"
    >
      <ArticleItem
        v-for="item in list"
        :key="item.id"
        :item="item"
      ></ArticleItem>
    </van-list>
  </div>
</template>

<script>
import { getSell } from '@/api/atticle'
import ArticleItem from '@/components/ArticleItem.vue'

export default {
  components: { ArticleItem },
  name: 'collect-page',
  data () {
    return {
      list: [],
      loading: false,
      finished: false

    }
  },
  methods: {
    async onLoad () {
      const { body } = await getSell()
      console.log(body)
      this.list.push(...body)
    }
  }
}
</script>

<style lang="less" scoped>
.collect-page {
  margin-bottom: 50px;
  margin-top: 44px;
}
</style>
